package cn.wp.ewallet.wmps.dao;

import cn.hutool.core.date.DateTime;
import cn.wp.ewallet.wmps.model.entity.EarnStatLogDo;

import java.util.Date;

/**
 * 收益统计-数据访问层
 * Created by zhnagyongli on 2020/01/11
 */
public interface EarnStatLogDao {

    /**
     * 查询最新收益统计信息
     * @param address
     * @return
     */
    EarnStatLogDo selectLatestEarnStatLog(String address);


    /**
     * 查询指定日期的收益信息
     * @param address
     * @param date
     * @return
     */
    EarnStatLogDo selectEarnStatLogByDate(String address, String date);

    /**
     * 修改统计收益
     * @param earnStatLogDo
     */
    void update(EarnStatLogDo earnStatLogDo);

    /**
     * 生成统计收益
     * @param earnStatLogDo
     */
    void insert(EarnStatLogDo earnStatLogDo);

    /**
     * 根据日期和钱包地址查询统计收益
     * @param date
     * @param walletAddress
     * @return
     */
    EarnStatLogDo selectEarnLogByStatDateAndWalletAddress(Date date, String walletAddress);
}